class CreateAluno < ActiveRecord::Migration
  def self.up
    create_table :aluno do |t|
       t.column :nome, :string, :limit => 50, :null => false
       t.column :matricula, :string, :limit => 25
       t.column :dt_nascimento, :date, :null => false
       t.column :telefone1, :string, :limit => 15
       t.column :telefone2, :string, :limit => 15
       t.column :end_logradouro, :string, :limit => 50
       t.column :end_numero, :string, :limit => 10
       t.column :end_complemento, :string, :limit => 25
       t.column :end_bairro, :string, :limit => 50
       t.column :end_cidade, :string, :limit => 50
       t.column :end_uf, :string, :limit => 2
       t.column :end_cep, :string, :limit => 11
       t.column :email, :string, :limit => 100
       t.column :dt_ingresso, :date, :null => false
       t.column :dt_saida, :date, :null => false
       t.column :cpf, :string, :limit => 11
       t.column :rg, :string, :limit => 11
       t.column :rg_orgao_expedidor, :string, :limit => 10
       t.column :certidao_numero, :string, :limit => 10
       t.column :certidao_livro, :string, :limit => 5
       t.column :certidao_folha, :string, :limit => 5
       t.column :observacao, :string, :limit => 255
       t.column :situacao_academica_id, :integer, :null => false
       t.column :responsavel_pedagogico_id, :integer, :null => false
       t.column :responsavel_financeiro_id, :integer, :null => false
       t.column :responsavel_pai_id, :integer
       t.column :responsavel_mae_id, :integer
       t.column :colegio_origem_id, :integer
       t.column :created_at, :date, :null => false
       t.column :updated_at, :date
    end
  end

  def self.down
    drop_table :aluno
  end
end
